<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<script type="text/javascript">
$('#moduls_fun_addGroup_addForm input').bind('keyup', function(event) {
	if(event.keyCode == 13) {
		$('#moduls_fun_addGroup_addForm').submit();
	}
});

$(function(){
$('#moduls_fun_getUserBy_userId').combogrid({
					url : '${pageContext.request.contextPath}/userAction!queryUser.action',
					loadMsg : '数据加载中....',
					missingMessage : '请检索用户名',
					panelWidth : 440,
					panelHeight : 180,
					delay : 500,
					required : true,
					fitColumns : true,
					value : '',
					idField : 'userId',
					textField : 'userRealName',
					mode : 'remote',
					pagination : true,
					pageSize : 5,
					pageList : [ 5, 10 ],
					columns : [ [ {
						title : '编号',
						field : 'userId',
						width : 150,
						hidden : true
					}, {
						title : '工号',
						field : 'username',
						width : 80
					}, {
						title : '用户姓名',
						field : 'userRealName',
						width : 80
					}, {
						title : '所在部门',
						field : 'groupId',
						width : 100,
						formatter : function(value, row, index) {
							if (value == 0)
								return '';
							return row.groupName;
						}
					} ] ],
					onLoadSuccess : function(data) {
						if (data.rows.length == 1) {
							$(this).combogrid("grid").datagrid('selectRow', 0);
						}
					},
					onHidePanel : function() {
						////console.info($(this).combogrid("getValue"));
					}
				});
});


</script>
<div align="center">
<br/>
	<form id="moduls_fun_addGroup_addForm" method="post">
		<table class="tableForm">
			<tr>
				<th style="width: 60px;font-size: 12px; font-weight: normal;">机构名称</th>
				<td><input name="groupName" class="easyui-validatebox" data-options="required:true" />
				</td>
			</tr>
			<tr>
				<th style="width: 80px;font-size: 12px; font-weight: normal;">分管领导</th>
				<td><select id="moduls_fun_getUserBy_userId" name="groupLeaderId" style="display: none;width:157px;"></select></td>
			</tr>
			<tr>
				<th style="width: 60px;font-size: 12px; font-weight: normal;">显示顺序</th>
				<td><input name="showSort" class="easyui-validatebox" data-options="required:false" />
				</td>
			</tr>			
		</table>
	</form>
</div>